package com.tanhua.model.mongo;

import lombok.Data;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.geo.GeoJsonPoint;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

@Data
@Document(collection = "PB_voice")
@CompoundIndex(name = "location_index", def = "{'location': '2dsphere'}")
public class PBVoice implements Serializable {
    private ObjectId id;//主键id  语音id
    private Integer userId;//用户id
    private String soundUrl;//语音地址
    private String gender;//用户性别
    private GeoJsonPoint location; //x:经度 y:纬度
    private Integer age;//用户年龄

}